<template>
  <ych-modal
    :fullscreen="false"
    :title="title"
    :visible="visible"
    @cancel="handleCancel"
    :cancelText="$t('m.common.button.close')">
    <iframe :src="url" width="100%" height="100%"></iframe>

    <template slot="footer">
      <a-button key="back" @click="handleCancel">{{ $t('m.common.button.close') }}</a-button>
    </template>
  </ych-modal>
</template>

<script>

  // 简单的弹框Url展示页面

  export default {
    name: 'IframeCommonDialog',
    props: {
      obj: Object
    },
    data () {
      return {
        url: this.obj.url,
        title: this.$t('m.eform.formDesign.label.dui-hua-kuang'),
        visible: false,
      }
    },
    created () {
      this.visible = true
    },
    methods: {
      handleCancel () {
        this.visible = false
      },
    },
  }
</script>
